package com.zbec.mdrs.entity.drafts;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zbec.mdrs.entity.RecordEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by fxl on 2015/10/17.
 */
@Entity
@Table(name = "tb_drafts")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Drafts extends RecordEntity implements Serializable {
    private String zzjgdm;//组织机构代码
    private String sjsj;//数据年月
    private String cprmc;//出票人名称
    private String jrjgbm;//承兑金融机构编码
    private String bz;//币种
    private BigDecimal hpje;//汇票金额
    private Date hpcdr;//汇票承兑日
    private Date hpdqr;//汇票到期日
    private Date hpfkrq;//汇票付款日期
    private BigDecimal bzjbl;//保证金比例
    private String dbbz;//担保标志
    private String wjfl;//五级分类
    private String dkbz;//垫款标志

    private String detail;
    private String dkkbm;//贷款卡编
    private String cdxyh;//承兑协议号码
    public String getDkkbm() {
        return dkkbm;
    }

    public void setDkkbm(String dkkbm) {
        this.dkkbm = dkkbm;
    }

    public String getZzjgdm() {
        return zzjgdm;
    }

    public void setZzjgdm(String zzjgdm) {
        this.zzjgdm = zzjgdm;
    }

    public String getSjsj() {
        return sjsj;
    }

    public void setSjsj(String sjsj) {
        this.sjsj = sjsj;
    }

    public String getCprmc() {
        return cprmc;
    }

    public void setCprmc(String cprmc) {
        this.cprmc = cprmc;
    }

    public String getJrjgbm() {
        return jrjgbm;
    }

    public void setJrjgbm(String jrjgbm) {
        this.jrjgbm = jrjgbm;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public BigDecimal getHpje() {
        return hpje;
    }

    public void setHpje(BigDecimal hpje) {
        this.hpje = hpje;
    }

    public Date getHpcdr() {
        return hpcdr;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public void setHpcdr(Date hpcdr) {
        this.hpcdr = hpcdr;
    }

    public Date getHpdqr() {
        return hpdqr;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public void setHpdqr(Date hpdqr) {
        this.hpdqr = hpdqr;
    }

    public Date getHpfkrq() {
        return hpfkrq;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    public void setHpfkrq(Date hpfkrq) {
        this.hpfkrq = hpfkrq;
    }

    public BigDecimal getBzjbl() {
        return bzjbl;
    }

    public void setBzjbl(BigDecimal bzjbl) {
        this.bzjbl = bzjbl;
    }

    public String getDbbz() {
        return dbbz;
    }

    public void setDbbz(String dbbz) {
        this.dbbz = dbbz;
    }

    public String getWjfl() {
        return wjfl;
    }

    public void setWjfl(String wjfl) {
        this.wjfl = wjfl;
    }

    public String getDkbz() {
        return dkbz;
    }

    public void setDkbz(String dkbz) {
        this.dkbz = dkbz;
    }

    @Transient
    public String getDetail() {
        this.detail=" tb_drafts RecordId : "+this.recordId+" 组织机构代码 : "+this.zzjgdm
                +" 出票人名称 : "+this.cprmc;
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getCdxyh() {
        return cdxyh;
    }

    public void setCdxyh(String cdxyh) {
        this.cdxyh = cdxyh;
    }
}
